package com.superjson.showpro.controller;

import com.alibaba.fastjson.JSONObject;
import com.superjson.showpro.controller.core.BaseContoller;
import com.superjson.showpro.shared.result.Result;
import com.superjson.showpro.shared.result.ResultUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created By zby on 19:58 2019/5/22
 */
@RestController("indexController")
@RequestMapping("/index")
public class IndexController extends BaseContoller {

    /**
     * 获取请求头信息
     *
     * @return
     */
    @RequestMapping(method = RequestMethod.GET)
    public Result getHeader() {
        JSONObject body = new JSONObject();
        body.put("status", "200");
        body.put("success", "true");
        return ResultUtil.buildSuccess(body);
    }

}
